package me.yushuai.wukong.base.repository;

import me.yushuai.wukong.base.entity.LocGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * 针对表【BAS_LOC_GROUP2(库位组)】的数据库操作Mapper
 *
 * @author zhoushuai@189.cn
 * @since 2022-08-31
 */
@Repository
public interface LocGroupRepository extends JpaRepository<LocGroup, Long>, JpaSpecificationExecutor<LocGroup> {

    @Modifying
    @Query("delete from LocGroup  where groupId = ?1 and curVerNo = ?2")
    void deleteByLocGroupIdAndCurVerNo(Long locGroupId, Long curVerNo);


    boolean existsByBizId(String bizId);
}




